/********************************************************/
/*	Copyright (C) 2016 Gong Li Bin		 	*/
/*	Project:	GoLib-1.0.0			*/
/*	Author:		gong_libin			*/
/*	Date:		2016_01_01			*/
/*	File:		GoMapTest.go			*/
/********************************************************/

package main

import (
	"unsafe"
	. "GoGlb"
	C "GoCap"
)

func main() {
	j := 10
	l := new(C.GoList)
	for i := 0; i < j; i ++ {
		l.GoListPut(i + 10, uint(unsafe.Sizeof(i)))
	}
	GoPrint("Total: %d\n", l.GoListCnt())
	for i := 0; i < j; i ++ {
		v, b := l.GoListPop()
		if GO_TRUE == b {
			n := v.(*C.GoNode)
			GoPrint("Count[%04d]: %d\n", i, n.Data)
		} else {
			GoPrint("Count[%04d]: nil\n", i)
		}
	}
}
